package com.xingkeduo.business.schedule.service.marketing;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.xingkeduo.business.schedule.remote.MarketingRemoteService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;


/**
 * 
* @ClassName: MarketingCardAbolishExpiredTaskJobHandler2
* @Description: 用户卡过期作废更新状态
* @author lixin
* @date Jun 21, 2019 6:25:19 PM
*
 */
@JobHandler(value="marketingCardAbolishExpiredTaskJobHandler")
@Component
public class MarketingCardAbolishExpiredTaskJobHandler extends IJobHandler {

    @Autowired
    private MarketingRemoteService marketingRemoteService;

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        XxlJobLogger.log(s+"用户卡过期状态变更 start...");
        try{
        	marketingRemoteService.expireAbolishCardTask();
        }catch (Exception e){
        	XxlJobLogger.log(s+"用户卡过期状态变更exception...");
            XxlJobLogger.log(e.getMessage());
        }
        XxlJobLogger.log(s+"用户卡过期状态变更 end...");
        return ReturnT.SUCCESS;
    }
}
